package com.open.capacity;

import com.open.capacity.common.port.PortApplicationEnvironmentPreparedEventListener;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Configuration;

@Configuration
@SpringBootApplication
@EnableDiscoveryClient
@MapperScan("com.open.capacity.task.dao")
public class TaskCenterApp {
    public static void main(String[] args) {
        //SpringApplication.run(TaskCenterApp.class,args);

        //随机端口启动
        SpringApplication app=new SpringApplication(TaskCenterApp.class);
        app.addListeners(new PortApplicationEnvironmentPreparedEventListener());
        app.run(args);
    }
}
